/*package com.servlet;


import java.util.SortedMap;
import java.util.TreeMap;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.utils.PayUtils;
import com.utils.Sha1Util;

public class Json {
	private static Logger logger = LoggerFactory.getLogger(Json.class);
	public static void main(String[] args) {
		//logger.info("cc");
//		PayUtils or=new PayUtils();
//		
//		System.out.println(or.getMoney("8"));
		
//		String aa="";
//		
//		if(!StringUtils.isNotBlank(aa)){
//			System.out.println("cs");
//		}else{
//			System.out.println("cssss");
//		}
		
		//System.out.println(or.getRefund()+"====");
		//System.out.println(or.getOrderQuery().getErr_code_des()+"-----");
//		ObjectMapper obj=new ObjectMapper();
//		try {
//			System.out.println(obj.writeValueAsString(or.getOrderQuery()));
//			
//		} catch (Exception e) {
//			e.printStackTrace();
//		} 
		
//		String r="SUCCESS";
//		String t="FAIL";
//		
//	     if(r=="SUCCESS" && t!="SUCCESS"){
//	    	 System.out.println("错误消息");
//	    	
//	     }
//		 if(r=="SUCCESS" && t=="SUCCESS"){
//			System.out.println("挣钱ddd");
//		 }
//		PayJson pay=new PayJson();
//		pay.setAppId("aa");
//		pay.setNonceStr("bb");
//		pay.setPackages("cc");
//		pay.setTimeStamp("dd");
//		pay.setSign("ee");
//		PayMessage message=new PayMessage();
//		//message.setPayJson(pay);
//		message.setMessage("统一支付接口获取预支付订单出错");
//		message.setState("-1");
//		ObjectMapper obj=new ObjectMapper();
//		try {
//			System.out.println(obj.writeValueAsString(message));
//			
//		} catch (Exception e) {
//			e.printStackTrace();
//		} 
//		
		
		 Sha1Util sh=new Sha1Util();
		 SortedMap<String, String> packageParams = new TreeMap<String, String>();
		 packageParams.put("subMchId","1345842501");  
		 packageParams.put("outTradeNo","9001201606031806027"); 
		 packageParams.put("opUserId","1342797001"); 
		 packageParams.put("outRefundNo","9001201606031806027");
		 packageParams.put("refundFee","1");
		 packageParams.put("totalFee","1");
		 packageParams.put("appid","wxb50d6933834082a6");
		 packageParams.put("appsecret","6db565d53343acdf96dd2fa2b4f38ebd");
		 
		 
		 SortedMap<String, String> packageParams = new TreeMap<String, String>();
			packageParams.put("userId", "-1");  
			packageParams.put("orderNo", "9001201607121025037");   
			packageParams.put("money", "4.0"); 
			packageParams.put("submchid", "1345842501"); 
			packageParams.put("notifyUrl", "http://61.139.53.10:2030/ophiuxAppointDataService/weixingzh/doCallBack.do");
			packageParams.put("appid", "wxb50d6933834082a6");
			packageParams.put("backurl", "http://61.139.53.10:2030/HospWeChatWebSite/jsp/order!beforesuccessorder.action");
			packageParams.put("appsecret", "6db565d53343acdf96dd2fa2b4f38ebd");
			
			
			
			packageParams.put("userId", "-1");  
			packageParams.put("orderNo", "9001201607121025037");   
			packageParams.put("money", money); 
			packageParams.put("submchid", subMchid); 
			packageParams.put("notifyUrl", notifyUrl);
			packageParams.put("appid", appid);
			packageParams.put("backurl", backurl);
			packageParams.put("appsecret", appsecret);
		
//		 packageParams.put("subMchId","1342797001");  
//		 packageParams.put("outTradeNo","9001201606141737026"); 
//		 packageParams.put("opUserId","1342797001"); 
//		 packageParams.put("outRefundNo","9001201606141737026");
//		 packageParams.put("refundFee","8");
//		 packageParams.put("totalFee","8");
//		 packageParams.put("appid","wxb50d6933834082a6");
//		 packageParams.put("appsecret","6db565d53343acdf96dd2fa2b4f38ebd");
		try {
			System.out.println(sh.createSHA1Sign(packageParams));
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			System.out.println(e+"ccc");
			logger.error("HIS 接口调用异常 参数：{},异常信息：{}",new String []{e.toString()});
			e.printStackTrace();
		}
///		GetWxOrderno wx=new GetWxOrderno();
//		
//		String xml="<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg><appid><![CDATA[wx2421b1c4370ec43b]]></appid><mch_id><![CDATA[10000100]]></mch_id><nonce_str><![CDATA[IITRi8Iabbblz1Jc]]></nonce_str><sign><![CDATA[7921E432F65EB8ED0CE9755F0E86D72F]]></sign><result_code><![CDATA[SUCCESS]]></result_code><prepay_id><![CDATA[wx201411101639507cbf6ffd8b0779950874]]></prepay_id><trade_type><![CDATA[JSAPI]]></trade_type><error_code><![CDATA[中额外呢]]></error_code></xml>";
//		
//		try {
//			String jsonStr = EntityUtils.toString(jsonStr, "UTF-8");
//			Map map =wx.doXMLParse(jsonStr);
//			String error_code  = (String) map.get("error_code");
//			System.out.println(error_code);
//		} catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
		
	}

}
*/